package com.qfedu.service.impl;

import com.qfedu.entity.IndexImg;
import com.qfedu.entity.ResultVo;
import com.qfedu.mapper.IndexImgMapper;
import com.qfedu.service.IndexImgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * 作者：刘随阳
 * 时间: 2021/9/18 17:37
 * 描述：神光照耀,太白成瑞。六丙来迎,百福悠归
 */
@Service
public class IndexImgServiceImpl implements IndexImgService {

    @Autowired
    private IndexImgMapper indexImgMapper;


    @Transactional
    public ResultVo getIndexImg(){
        Example example = new Example(IndexImg.class);
        Example.Criteria criteria = example.createCriteria();
        criteria.andEqualTo("imgStat",0);
        List<IndexImg> indexImgs = indexImgMapper.selectByExample(example);
        return ResultVo.success("查询成功",indexImgs);
    }
}
